﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HRSys.Master" AutoEventWireup="true"
    CodeBehind="ApplyLeave.aspx.cs" Inherits="HRWebSite.Employee.ApplyLeave" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title id="Title1" runat="server" title="假期申请"></title>
    <link type="text/css" href="../css/smoothness/jquery-ui-1.7.custom.css" rel="stylesheet" />
    <script type="text/javascript" src="../scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../scripts/jquery-ui-1.7.custom.min.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="height: 160px; width: 517px" border="1">
        <tr>
            <td class="td-odd">
                类型
            </td>
            <td colspan="2" class="td-even">
                <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
                    DataTextField="Name" DataValueField="DictID">
                </asp:DropDownList>
            </td>
            <td class="td-but">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="提交" />
            </td>
        </tr>
        <tr>
            <td class="td-odd">
                开始日期
            </td>
            <td class="td-even">
                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                <asp:Literal ID="literal1" runat="server"></asp:Literal>
            </td>
            <td class="td-odd">
                开始时间
            </td>
            <td class="td-even">
                <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="td-odd">
                结束日期
            </td>
            <td class="td-even">
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                <asp:Literal ID="literal2" runat="server"></asp:Literal>
            </td>
            <td class="td-odd">
                结束时间
            </td>
            <td class="td-even">
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HRSys %>"
        SelectCommand="SELECT * FROM [Dict] WHERE ([Type] = @Type)">
        <SelectParameters>
            <asp:Parameter DefaultValue="3" Name="Type" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="HolidyID"
        DataSourceID="SqlDataSource2" OnRowDeleting="GridView1_RowDeleting" CellPadding="4"
        ForeColor="#333333">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="Start" HeaderText="开始时间" SortExpression="Start" />
            <asp:BoundField DataField="End" HeaderText="结束时间" SortExpression="End" />
            <asp:BoundField DataField="Name" HeaderText="类型" SortExpression="Name" />
            <asp:BoundField DataField="Audit" HeaderText="审核人" SortExpression="Audit" />
            <asp:TemplateField HeaderText="状态" SortExpression="state">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# GetState(Eval("state").ToString()) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField HeaderText="操作" DeleteText="删除" ShowDeleteButton="True" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:HRSys %>"
        SelectCommand="SELECT * FROM [HolidyView] WHERE NumberID=@numberid">
        <SelectParameters>
            <asp:SessionParameter Name="numberid" Type="String" SessionField="ApplyLeave_NumberID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
